<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>NBMRoomClient Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1334)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">KurentoToolbox </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">Nubomedia TI</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	
	<optgroup label="Properties">
		
		<option value="//api/name/connected">connected</option>
		
		<option value="//api/name/connectionState">connectionState</option>
		
		<option value="//api/name/delegate">delegate</option>
		
		<option value="//api/name/joined">joined</option>
		
		<option value="//api/name/peers">peers</option>
		
		<option value="//api/name/room">room</option>
		
		<option value="//api/name/timeout">timeout</option>
		
	</optgroup>
	

	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/connect">- connect</option>
		
		<option value="//api/name/initWithRoom:delegate:">- initWithRoom:delegate:</option>
		
		<option value="//api/name/initWithRoom:timeout:delegate:">- initWithRoom:timeout:delegate:</option>
		
		<option value="//api/name/joinRoom">- joinRoom</option>
		
		<option value="//api/name/joinRoom:">- joinRoom:</option>
		
		<option value="//api/name/leaveRoom">- leaveRoom</option>
		
		<option value="//api/name/leaveRoom:">- leaveRoom:</option>
		
		<option value="//api/name/peerWithIdentifier:">- peerWithIdentifier:</option>
		
		<option value="//api/name/publishVideo:loopback:">- publishVideo:loopback:</option>
		
		<option value="//api/name/publishVideo:loopback:completion:">- publishVideo:loopback:completion:</option>
		
		<option value="//api/name/receiveVideoFromPeer:offer:">- receiveVideoFromPeer:offer:</option>
		
		<option value="//api/name/receiveVideoFromPeer:offer:completion:">- receiveVideoFromPeer:offer:completion:</option>
		
		<option value="//api/name/sendCustomRequest:">- sendCustomRequest:</option>
		
		<option value="//api/name/sendCustomRequest:completion:">- sendCustomRequest:completion:</option>
		
		<option value="//api/name/sendICECandidate:forPeer:">- sendICECandidate:forPeer:</option>
		
		<option value="//api/name/sendICECandidate:forPeer:completion:">- sendICECandidate:forPeer:completion:</option>
		
		<option value="//api/name/sendMessage:">- sendMessage:</option>
		
		<option value="//api/name/sendMessage:completion:">- sendMessage:completion:</option>
		
		<option value="//api/name/unpublishVideo">- unpublishVideo</option>
		
		<option value="//api/name/unpublishVideo:">- unpublishVideo:</option>
		
		<option value="//api/name/unsubscribeVideoFromPeer:">- unsubscribeVideoFromPeer:</option>
		
		<option value="//api/name/unsubscribeVideoFromPeer:completion:">- unsubscribeVideoFromPeer:completion:</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">NBMRoomClient Class Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Inherits from</th>
	<td>NSObject</td>
</tr><tr>
	<th>Declared in</th>
	<td>NBMRoomClient.h</td>
</tr>
						</tbody></table></div>
					

                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>It&rsquo;s actually only a wrapper over the JSON-RPC protocol used to communicate with Room Server.
The developer of room applications can use this API when implementing an iOS client.</p>
					</div>
					
					

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						
						

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/delegate" title="delegate"></a>
	<h3 class="method-title"><code><a href="#//api/name/delegate">&nbsp;&nbsp;delegate</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>The delegate object for the client.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, weak) id&lt;NBMRoomClientDelegate&gt; delegate</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/peers" title="peers"></a>
	<h3 class="method-title"><code><a href="#//api/name/peers">&nbsp;&nbsp;peers</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>A list of connected NBMPeer objects.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) NSArray *peers</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/room" title="room"></a>
	<h3 class="method-title"><code><a href="#//api/name/room">&nbsp;&nbsp;room</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>The NBMRoom instance representing the joined room.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) NBMRoom *room</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/timeout" title="timeout"></a>
	<h3 class="method-title"><code><a href="#//api/name/timeout">&nbsp;&nbsp;timeout</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>The timeout interval for API requests, in seconds.
Default value is 5.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readonly) NSTimeInterval timeout</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/connectionState" title="connectionState"></a>
	<h3 class="method-title"><code><a href="#//api/name/connectionState">&nbsp;&nbsp;connectionState</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			

			<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readonly) NBMRoomClientConnectionState connectionState</code></div>

		    
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/connected" title="connected"></a>
	<h3 class="method-title"><code><a href="#//api/name/connected">&nbsp;&nbsp;connected</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>A Boolean that indicates the WebSocket connection status.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readonly, getter=isConnected) BOOL connected</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/joined" title="joined"></a>
	<h3 class="method-title"><code><a href="#//api/name/joined">&nbsp;&nbsp;joined</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>A Boolean that indicates if the room was joined by the local peer.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readonly, getter=isJoined) BOOL joined</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/initWithRoom:delegate:" title="initWithRoom:delegate:"></a>
	<h3 class="method-title"><code><a href="#//api/name/initWithRoom:delegate:">&ndash;&nbsp;initWithRoom:delegate:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Creates and initializes a NBMRoomClient with default API timeout interval.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (instancetype)initWithRoom:(NBMRoom *)<em>room</em> delegate:(id&lt;NBMRoomClientDelegate&gt;)<em>delegate</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>room</code></th>
						<td><p>The room to join with.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>delegate</code></th>
						<td><p>The delegate object for the client</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>An initialized NBMRoomClient object.</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/initWithRoom:timeout:delegate:" title="initWithRoom:timeout:delegate:"></a>
	<h3 class="method-title"><code><a href="#//api/name/initWithRoom:timeout:delegate:">&ndash;&nbsp;initWithRoom:timeout:delegate:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Creates and initializes a NBMRoomClient with a custom API timeout interval.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (instancetype)initWithRoom:(NBMRoom *)<em>room</em> timeout:(NSTimeInterval)<em>timeout</em> delegate:(id&lt;NBMRoomClientDelegate&gt;)<em>delegate</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>room</code></th>
						<td><p>The room to join with.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>timeout</code></th>
						<td><p>The timeout interval for API requests, in seconds.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>delegate</code></th>
						<td><p>The delegate object for the client.</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>An initialized NBMRoomClient object.</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/connect" title="connect"></a>
	<h3 class="method-title"><code><a href="#//api/name/connect">&ndash;&nbsp;connect</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Connects client to the Room Server using WebSocket, giving access to its API when the connection is
established successfully.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)connect</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="note"><p><strong>Note:</strong> See [NBMRoomClientDelegate client:isConnected:] method.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/joinRoom" title="joinRoom"></a>
	<h3 class="method-title"><code><a href="#//api/name/joinRoom">&ndash;&nbsp;joinRoom</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represents a client&rsquo;s request to join a room. If the room does not exists, it is created.
When the request is processed, the [NBMRoomClientDelegate client:didJoinRoom:] message is sent to the client&rsquo;s delegate.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)joinRoom</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/joinRoom:" title="joinRoom:"></a>
	<h3 class="method-title"><code><a href="#//api/name/joinRoom:">&ndash;&nbsp;joinRoom:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represents a client&rsquo;s request to join a room. If the room does not exists, it is created.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)joinRoom:(void ( ^ ) ( NSSet *peers , NSError *error ))<em>block</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>block</code></th>
						<td><p>A block object to be executed when the request is processed. This block has no return value and takes an NSSet of remote partecipants and an error if the request failed.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="note"><p><strong>Note:</strong> No message is sent to client&rsquo;s delegate.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/leaveRoom" title="leaveRoom"></a>
	<h3 class="method-title"><code><a href="#//api/name/leaveRoom">&ndash;&nbsp;leaveRoom</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represent a client&rsquo;s notification that it&rsquo;s leaving the room.
When the request is processed, the [NBMRoomClientDelegate client:didLeaveRoom:] message is sent to the client&rsquo;s delegate.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)leaveRoom</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/leaveRoom:" title="leaveRoom:"></a>
	<h3 class="method-title"><code><a href="#//api/name/leaveRoom:">&ndash;&nbsp;leaveRoom:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represent a client&rsquo;s notification that it&rsquo;s leaving the room.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)leaveRoom:(void ( ^ ) ( NSError *error ))<em>block</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>block</code></th>
						<td><p>A block object to be executed when the request is processed. This block has no return value and takes an error if the request failed.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="note"><p><strong>Note:</strong> No message is sent to client&rsquo;s delegate.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/publishVideo:loopback:" title="publishVideo:loopback:"></a>
	<h3 class="method-title"><code><a href="#//api/name/publishVideo:loopback:">&ndash;&nbsp;publishVideo:loopback:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represents a client’s request to start streaming her local media to anyone inside the room.
When the request is processed, the [NBMRoomClientDelegate client:didPublishVideo:loopback:error:] message is sent to the client&rsquo;s delegate.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)publishVideo:(NSString *)<em>sdpOffer</em> loopback:(BOOL)<em>doLoopback</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>sdpOffer</code></th>
						<td><p>A NSString representing an SDP offer.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>doLoopback</code></th>
						<td><p>A Boolean enabling media loopback.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/publishVideo:loopback:completion:" title="publishVideo:loopback:completion:"></a>
	<h3 class="method-title"><code><a href="#//api/name/publishVideo:loopback:completion:">&ndash;&nbsp;publishVideo:loopback:completion:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represents a client’s request to start streaming her local media to anyone inside the room.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)publishVideo:(NSString *)<em>sdpOffer</em> loopback:(BOOL)<em>doLoopback</em> completion:(void ( ^ ) ( NSString *sdpAnswer , NSError *error ))<em>block</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>sdpOffer</code></th>
						<td><p>A NSString representing an SDP offer.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>doLoopback</code></th>
						<td><p>A Boolean enabling media loopback.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>block</code></th>
						<td><p>A block object to be executed when the request is processed. This block has no return value and takes the SDP answer sent by KMS and an error if the request failed.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="note"><p><strong>Note:</strong> No message is sent to client&rsquo;s delegate.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/unpublishVideo" title="unpublishVideo"></a>
	<h3 class="method-title"><code><a href="#//api/name/unpublishVideo">&ndash;&nbsp;unpublishVideo</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represents a client’s request to stop streaming its local media to the room peers.
When the request is processed, the [NBMRoomClientDelegate client:didUnPublishVideo:] message is sent to the client&rsquo;s delegate.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)unpublishVideo</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/unpublishVideo:" title="unpublishVideo:"></a>
	<h3 class="method-title"><code><a href="#//api/name/unpublishVideo:">&ndash;&nbsp;unpublishVideo:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represents a client’s request to stop streaming its local media to the room peers.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)unpublishVideo:(void ( ^ ) ( NSError *error ))<em>block</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>block</code></th>
						<td><p>A block object to be executed when the request is processed. This block has no return value and takes an error if the request failed.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="note"><p><strong>Note:</strong> No message is sent to client&rsquo;s delegate.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/receiveVideoFromPeer:offer:" title="receiveVideoFromPeer:offer:"></a>
	<h3 class="method-title"><code><a href="#//api/name/receiveVideoFromPeer:offer:">&ndash;&nbsp;receiveVideoFromPeer:offer:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represents a client’s request to receive media from participants in the room that published their media.
This method can also be used for loopback connections.
When the request is processed, the [NBMRoomClientDelegate client:didReceiveVideoFrom:sdpAnswer:error:] message is sent to the client&rsquo;s delegate.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)receiveVideoFromPeer:(NBMPeer *)<em>peer</em> offer:(NSString *)<em>sdpOffer</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>peer</code></th>
						<td><p>A NBMPeer that is publishing media.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>sdpOffer</code></th>
						<td><p>A NSString representing an SDP offer.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/receiveVideoFromPeer:offer:completion:" title="receiveVideoFromPeer:offer:completion:"></a>
	<h3 class="method-title"><code><a href="#//api/name/receiveVideoFromPeer:offer:completion:">&ndash;&nbsp;receiveVideoFromPeer:offer:completion:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represents a client’s request to receive media from participants in the room that published their media.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)receiveVideoFromPeer:(NBMPeer *)<em>peer</em> offer:(NSString *)<em>sdpOffer</em> completion:(void ( ^ ) ( NSString *sdpAnswer , NSError *error ))<em>block</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>peer</code></th>
						<td><p>A NBMPeer that is publishing media.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>sdpOffer</code></th>
						<td><p>A NSString representing an SDP offer.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>block</code></th>
						<td><p>A block object to be executed when the request is processed. This block has no return value and takes the SDP answer sent by KMS and an error if the request failed.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="note"><p><strong>Note:</strong> No message is sent to client&rsquo;s delegate.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/unsubscribeVideoFromPeer:" title="unsubscribeVideoFromPeer:"></a>
	<h3 class="method-title"><code><a href="#//api/name/unsubscribeVideoFromPeer:">&ndash;&nbsp;unsubscribeVideoFromPeer:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represents a client’s request to stop receiving media from a given publisher.
When the request is processed, the [NBMRoomClientDelegate client:didUnsubscribeVideoFrom:sdpAnswer:error:] message is sent to the client&rsquo;s delegate.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)unsubscribeVideoFromPeer:(NBMPeer *)<em>peer</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>peer</code></th>
						<td><p>A NBMPeer that is publishing media.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/unsubscribeVideoFromPeer:completion:" title="unsubscribeVideoFromPeer:completion:"></a>
	<h3 class="method-title"><code><a href="#//api/name/unsubscribeVideoFromPeer:completion:">&ndash;&nbsp;unsubscribeVideoFromPeer:completion:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represents a client’s request to stop receiving media from a given publisher.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)unsubscribeVideoFromPeer:(NBMPeer *)<em>peer</em> completion:(void ( ^ ) ( NSString *sdpAnswer , NSError *error ))<em>block</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>peer</code></th>
						<td><p>The NBMPeer that is publishing media.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>block</code></th>
						<td><p>A block object to be executed when the request is processed. This block has no return value and takes the SDP answer sent by KMS and an error if the request failed.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="note"><p><strong>Note:</strong> No message is sent to client&rsquo;s delegate.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/sendICECandidate:forPeer:" title="sendICECandidate:forPeer:"></a>
	<h3 class="method-title"><code><a href="#//api/name/sendICECandidate:forPeer:">&ndash;&nbsp;sendICECandidate:forPeer:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Request that carries info about an ICE candidate gathered on the client side. This information is required to implement the trickle ICE mechanism.
When the request is processed, the [NBMRoomClientDelegate client:didUnsubscribeVideoFrom:sdpAnswer:error:] message is sent to the client&rsquo;s delegate.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)sendICECandidate:(RTCICECandidate *)<em>candidate</em> forPeer:(NBMPeer *)<em>peer</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>candidate</code></th>
						<td><p>The RTCICECandidate object to send.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>peer</code></th>
						<td><p>The NBMPeer whose ICE candidate was found.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/sendICECandidate:forPeer:completion:" title="sendICECandidate:forPeer:completion:"></a>
	<h3 class="method-title"><code><a href="#//api/name/sendICECandidate:forPeer:completion:">&ndash;&nbsp;sendICECandidate:forPeer:completion:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Request that carries info about an ICE candidate gathered on the client side. This information is required to implement the trickle ICE mechanism.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)sendICECandidate:(RTCICECandidate *)<em>candidate</em> forPeer:(NBMPeer *)<em>peer</em> completion:(void ( ^ ) ( NSError *error ))<em>block</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>candidate</code></th>
						<td><p>The RTCICECandidate object to send.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>peer</code></th>
						<td><p>The NBMPeer whose ICE candidate was found.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>block</code></th>
						<td><p>A block object to be executed when the request is processed. This block has no return value and takes an error if the request failed.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="note"><p><strong>Note:</strong> No message is sent to client&rsquo;s delegate.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/sendMessage:" title="sendMessage:"></a>
	<h3 class="method-title"><code><a href="#//api/name/sendMessage:">&ndash;&nbsp;sendMessage:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represents a client&rsquo;s request to send written message to all other partecipants in the room.
When the request is processed, the [NBMRoomClientDelegate client:didSentMessage:] message is sent to the client&rsquo;s delegate.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)sendMessage:(NSString *)<em>message</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>message</code></th>
						<td><p>The text message.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/sendMessage:completion:" title="sendMessage:completion:"></a>
	<h3 class="method-title"><code><a href="#//api/name/sendMessage:completion:">&ndash;&nbsp;sendMessage:completion:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Represents a client&rsquo;s request to send written message to all other partecipants in the room.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)sendMessage:(NSString *)<em>message</em> completion:(void ( ^ ) ( NSError *error ))<em>block</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>message</code></th>
						<td><p>The text message.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>block</code></th>
						<td><p>A block object to be executed when the request is processed. This block has no return value and takes an error if the request failed.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="note"><p><strong>Note:</strong> No message is sent to client&rsquo;s delegate.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/sendCustomRequest:" title="sendCustomRequest:"></a>
	<h3 class="method-title"><code><a href="#//api/name/sendCustomRequest:">&ndash;&nbsp;sendCustomRequest:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Provides a custom envelope for requests not directly implemented by the Room server.
When the request is processed, the [NBMRoomClientDelegate client:didSentCustomRequest:] message is sent to the client&rsquo;s delegate.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)sendCustomRequest:(NSDictionary&lt;NSString*,NSString*&gt; *)<em>params</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>params</code></th>
						<td><p>A NSDictionary of NSString key-value parameters, their specification is left to the actual implementation.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/sendCustomRequest:completion:" title="sendCustomRequest:completion:"></a>
	<h3 class="method-title"><code><a href="#//api/name/sendCustomRequest:completion:">&ndash;&nbsp;sendCustomRequest:completion:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Provides a custom envelope for requests not directly implemented by the Room server.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)sendCustomRequest:(NSDictionary&lt;NSString*,NSString*&gt; *)<em>params</em> completion:(void ( ^ ) ( NSError *error ))<em>block</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>params</code></th>
						<td><p>A NSDictionary of NSString key-value parameters, their specification is left to the actual implementation.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>block</code></th>
						<td><p>A block object to be executed when the request is processed. This block has no return value and takes an error if the request failed.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="note"><p><strong>Note:</strong> No message is sent to client&rsquo;s delegate.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/peerWithIdentifier:" title="peerWithIdentifier:"></a>
	<h3 class="method-title"><code><a href="#//api/name/peerWithIdentifier:">&ndash;&nbsp;peerWithIdentifier:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Returns a remote NBMPeer with specified identifier, if exists.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (NBMPeer *)peerWithIdentifier:(NSString *)<em>identifier</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>identifier</code></th>
						<td><p>A unique NSString identifier (peer&rsquo;s username).</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>a NBMPeer object with specified identifier.</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMRoomClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2016 Nubomedia TI. All rights reserved. Updated: 2016-02-12</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>